package org.hzero.order.app.service;

import org.hzero.boot.scheduler.infra.annotation.JobHandler;
import org.hzero.boot.scheduler.infra.enums.ReturnT;
import org.hzero.boot.scheduler.infra.handler.IJobHandler;
import org.hzero.boot.scheduler.infra.tool.SchedulerTool;
import org.hzero.order.domain.repository.SoHeaderRepository;
import org.hzero.order.infra.mapper.SoHeaderMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;


/**
 * @ Description   :  调度任务
 * @ Author        :  xiong.yilin@hand-china.com
 * @ CreateDate    :  2019/8/8 10:33
 */
@JobHandler("closeOrder")
public class JobService implements IJobHandler {
    @Autowired
    SoHeaderMapper soHeaderMapper;

    @Override
    public ReturnT execute(Map<String, String> map, SchedulerTool tool) {
        //关闭已审批通过的订单
        soHeaderMapper.closeOrder();
        return null;
    }
}
